{% extends "base.html" %}

{% block title %}List{% endblock %}

{% block content %}

    <script type="text/javascript" >


 $(document).ready(function() {

{% for movie in movies %}
    $("#stars-wrapper-{{movie.key}}").stars({
        inputType: "select",
        disabled: true
     });
    $("#stars-wrapper-{{ movie.key}}").stars("select", "{{movie.average}}");
{% endfor %}

{% if username %} 
    GetMovies();
{% endif %}
 });


</script>



<div id='movielist'>
{% if not username %} 
{% for movie in movies %}
<div class='movie'>
{{ forloop.counter}}) {{movie.name}}  
[ <span id="stars-wrapper-{{movie.key}}" style="display:inline-block">
         <select name="rating" >
             <option value="1">Terrible</option>
             <option value="2">Not that bad</option>
             <option value="3">Average</option>
             <option value="4">Good</option>
             <option value="5">Awesome</option>
         </select>
     </span> ]

 ({{ movie.votes}} votes) added by <a href="/profile/{{movie.profile.nickname}}">{{movie.profile.nickname}}</a>

</div>
{% endfor %}
{% endif %}
 </div>


			  {% endblock %}
